import { RouterNameSpace } from './types';
/*
 * @Description: 
 * @Version: 2.0
 * @Author: AICHEN
 * @Date: 2023-02-10 00:26:51
 * @LastEditors: AICHEN
 * @LastEditTime: 2023-02-10 00:53:09
 */
import { createRouter, createWebHistory, RouterOptions } from 'vue-router';
import type { RouteRecordRaw } from 'vue-router';
import type {RouterNameSpace} from './types';

const routes:Array<RouteRecordRaw>=[

    {path:"/",redirect:"/index"},

    {
        path:"/index",
        component:()=>import("@/components/IndexLayout.vue"),
        children:[
            {
                path:"yiqing/list",
                name:RouterNameSpace.YiQingList,
                component:()=>import("@/views/yiqing/index.vue")
            },   {
                path:"outside/apply",
                name:RouterNameSpace.OutSideApply,
                component:()=>import("@/views/outside/index.vue")
            },   {
                path:"community/manager",
                name:RouterNameSpace.CommunityPeople,
                component:()=>import("@/views/community/index.vue")
            }
        ]
    }
]

const router=createRouter({
    history:createWebHistory(),
    routes,
})
export default router;